package com.soft.cake.pojo;

import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Repository;

@Repository
public class User {
    private Integer userId;

    private String userUsername;

    private String userPassword;

    private String userPhone;

    private String userEmail;

    private Date userBirthday;

    private List<Address> usersAddresses;
    
    private List<Order> usersOrders;
    
    public List<Order> getUsersOrders() {
		return usersOrders;
	}

	public void setUsersOrders(List<Order> usersOrders) {
		this.usersOrders = usersOrders;
	}

	public List<Address> getUsersAddresses() {
		return usersAddresses;
	}

	public void setUsersAddresses(List<Address> usersAddresses) {
		this.usersAddresses = usersAddresses;
	}

	public User() {
		super();
	}

	public User(String userUsername, String userPassword, String userPhone, String userEmail, Date userBirthday) {
		super();
		this.userUsername = userUsername;
		this.userPassword = userPassword;
		this.userPhone = userPhone;
		this.userEmail = userEmail;
		this.userBirthday = userBirthday;
	}

	public User(Integer userId, String userUsername, String userPassword, String userPhone, String userEmail,
			Date userBirthday) {
		super();
		this.userId = userId;
		this.userUsername = userUsername;
		this.userPassword = userPassword;
		this.userPhone = userPhone;
		this.userEmail = userEmail;
		this.userBirthday = userBirthday;
	}

	public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserUsername() {
        return userUsername;
    }

    public void setUserUsername(String userUsername) {
        this.userUsername = userUsername == null ? null : userUsername.trim();
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword == null ? null : userPassword.trim();
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone == null ? null : userPhone.trim();
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail == null ? null : userEmail.trim();
    }

    public Date getUserBirthday() {
        return userBirthday;
    }

    public void setUserBirthday(Date userBirthday) {
        this.userBirthday = userBirthday;
    }

	@Override
	public String toString() {
		return "User [userId=" + userId + ", userUsername=" + userUsername + ", userPassword=" + userPassword
				+ ", userPhone=" + userPhone + ", userEmail=" + userEmail + ", userBirthday=" + userBirthday + "]";
	}
    
}